//关于
import 'package:flutter/material.dart';

class Apps extends StatelessWidget {
  const Apps({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        backgroundColor: Colors.white,
        elevation: 0,
        title: Text("关于"),
        titleTextStyle: TextStyle(
          color: Colors.black,
          fontSize: 26,
        ),
        leading: Container(
          child:GestureDetector(
            onTap: (){
              Navigator.pop(context);
            },
            child: Icon(Icons.arrow_circle_left,color: Colors.blue,size: 40),
          ),
        ),
      ),
      body: AppsIndex(),
    );
  }
}

class AppsIndex extends StatefulWidget {
  const AppsIndex({Key? key}) : super(key: key);

  @override
  State<AppsIndex> createState() => _AppsIndexState();
}

class _AppsIndexState extends State<AppsIndex> {

  final String Number="1.0";
  final String LOGOURL="https://img1.baidu.com/it/u=2406640932,2520584746&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500";
  final String AppsName="某某新闻";
  @override
  Widget build(BuildContext context) {
    return Container(
      child: Column(
        children: [
          Expanded(
            child: Container(
              // color: Colors.pink,
              width: double.infinity,
            alignment: Alignment.center,
            child: Column(
              mainAxisAlignment: MainAxisAlignment.center,
              children: [
                Container(
                  child: Image.network(LOGOURL),
                  width: 110,
                  height: 110,
                ),
                Container(
                  margin: EdgeInsets.fromLTRB(0,18, 0, 0),
                  width: 110,
                  alignment: Alignment.center,
                  child: Column(
                    children: [
                      Text(AppsName,style: TextStyle(fontSize: 24),),
                      Text("当前版本为:$Number",style:TextStyle(fontSize: 12))
                    ],
                  )
                )
              ],
            ),
          ),
            flex: 9,
          ),
          Expanded(
            child: Container(
              width: double.infinity,
              child: Container(
                margin: EdgeInsets.fromLTRB(0, 0, 0, 20),
                child: Row(
                  mainAxisAlignment: MainAxisAlignment.center,
                  crossAxisAlignment: CrossAxisAlignment.end,
                  children: [
                    GestureDetector(
                      onTap: (){

                      },
                      child: Text("隐私政策",style: TextStyle(fontSize: 18),),
                    ),
                    Text("   |   ",style: TextStyle(fontSize: 22),),
                    GestureDetector(
                      onTap: (){

                      },
                      child: Text("关于我们",style: TextStyle(fontSize: 18),),
                    ),

                  ],
                ),
              )
            ),
            flex: 3,
          )
        ],
      ),
    );
  }
}

